package xjtu.sad.zbsj.template;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.util.Date;
import java.util.List;

public class Template {

    private Integer templateId;//模板Id
    private Integer userId;//创建用户Id
    private String userName;//创建用户名称
    private String templateName;//模板名称
    private String templateDesc;//模板描述
    private String contentKind;//模板类型

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GTM+8")
    private Date createTime;//创建时间

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GTM+8")
    private Date publishTime;//发布时间

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GTM+8")
    private Date editTime;//最后一次编辑时间
    private Boolean publicAccess;//是否公开

    private List<Attribute> attrs;//属性列表

    public Template() {
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getPublishTime() {
        return publishTime;
    }

    public void setPublishTime(Date publishTime) {
        this.publishTime = publishTime;
    }

    public Date getEditTime() {
        return editTime;
    }

    public void setEditTime(Date editTime) {
        this.editTime = editTime;
    }

    public Boolean getPublicAccess() {
        return publicAccess;
    }

    public void setPublicAccess(Boolean publicAccess) {
        this.publicAccess = publicAccess;
    }

    public String getContentKind() {
        return contentKind;
    }

    public void setContentKind(String contentKind) {
        this.contentKind = contentKind;
    }

    public Integer getTemplateId() {
        return templateId;
    }

    public void setTemplateId(Integer templateId) {
        this.templateId = templateId;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getTemplateName() {
        return templateName;
    }

    public void setTemplateName(String templateName) {
        this.templateName = templateName;
    }

    public String getTemplateDesc() {
        return templateDesc;
    }

    public void setTemplateDesc(String templateDesc) {
        this.templateDesc = templateDesc;
    }

    public List<Attribute> getAttrs() {
        return attrs;
    }

    public void setAttrs(List<Attribute> attrs) {
        this.attrs = attrs;
    }

    @Override
    public String toString() {
        return "Template{" +
                "templateId=" + templateId +
                ", userId=" + userId +
                ", templateName='" + templateName + '\'' +
                ", templateDesc='" + templateDesc + '\'' +
                ", contentKind='" + contentKind + '\'' +
                ", createTime=" + createTime +
                ", publishTime=" + publishTime +
                ", editTime=" + editTime +
                ", publicAccess=" + publicAccess +
                ", attrs=" + attrs +
                '}';
    }
}
